using System;
using InfoTech.Mvc.Core.Models;
using InfoTech.Utilities.Reflection;
using System.ComponentModel.DataAnnotations;
using InfoTech.Mvc.Core.UI.Validation;
using InfoTech.LanTranh.MucVu.Bussiness;

namespace InfoTech.Mvc.LanTranh.MucVu.Models
{
	[Serializable]
	public partial class LINHMUCModel : ObjModel<LINHMUC>, IModelConverter
	{

		#region Constructor

		public LINHMUCModel()
			: base()
		{
		}

		public LINHMUCModel(LINHMUC obj)
			: base(obj)
		{
		}

		#endregion

		#region Fields

		private System.Guid? _machaxu;

		private System.String _tenthanh;

		private System.String _hovatendem;

		private System.String _ten;

		private System.String _dienthoai;

		private System.String _diachi;

		private System.String _email;

		private System.String _mobile;

		private System.Guid? _machucvu;

		private System.Int32? _ngaysinh;

		private System.Int32? _thangsinh;

		private System.Int32? _namsinh;

		#endregion

		#region Properties

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MACHAXU
		{
			get
			{
				return _machaxu;
			}
			set
			{
				_machaxu = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(500, ErrorMessage= "Value must be under 500 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String TENTHANH
		{
			get
			{
				return _tenthanh;
			}
			set
			{
				_tenthanh = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(500, ErrorMessage= "Value must be under 500 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String HOVATENDEM
		{
			get
			{
				return _hovatendem;
			}
			set
			{
				_hovatendem = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(100, ErrorMessage= "Value must be under 100 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String TEN
		{
			get
			{
				return _ten;
			}
			set
			{
				_ten = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(20, ErrorMessage= "Value must be under 20 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String DIENTHOAI
		{
			get
			{
				return _dienthoai;
			}
			set
			{
				_dienthoai = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(1000, ErrorMessage= "Value must be under 1000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String DIACHI
		{
			get
			{
				return _diachi;
			}
			set
			{
				_diachi = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(1000, ErrorMessage= "Value must be under 1000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String EMAIL
		{
			get
			{
				return _email;
			}
			set
			{
				_email = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(20, ErrorMessage= "Value must be under 20 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String MOBILE
		{
			get
			{
				return _mobile;
			}
			set
			{
				_mobile = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MACHUCVU
		{
			get
			{
				return _machucvu;
			}
			set
			{
				_machucvu = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? NGAYSINH
		{
			get
			{
				return _ngaysinh;
			}
			set
			{
				_ngaysinh = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? THANGSINH
		{
			get
			{
				return _thangsinh;
			}
			set
			{
				_thangsinh = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? NAMSINH
		{
			get
			{
				return _namsinh;
			}
			set
			{
				_namsinh = value;
			}
		}

		#endregion

		#region IModelConverter

		public System.Type Reflector()
		{
			return typeof(LINHMUCModel);
		}
		public object GetModel()
		{
			return this;
		}

		#endregion

		#region Overrides of Model<LINHMUC>

		public override void ReverttoModel()
		{
			CreateModel(this);
		}

		public override LINHMUC ReverttoBussiness()
		{
			return CreateBussiness(this);
		}

		#endregion

		#region Operators

		public static implicit operator LINHMUCModel(LINHMUC obj)
		{
			return new LINHMUCModel(obj);
		}
		public static implicit operator LINHMUC(LINHMUCModel obj)
		{
			return obj.ReverttoBussiness();
		}

		#endregion

	}
}
